#!/bin/sh

PRG="$0"
export CURDIR=`pwd`
# need this for relative symlinks
while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`"/$link"
  fi
done

BIN=$TREETAGGER_HOME/bin
CMD=$TREETAGGER_HOME/cmd
LIB=$TREETAGGER_HOME/lib

TAGGER=${BIN}/tree-tagger
ABBR_LIST=${LIB}/english-abbreviations
PARFILE=${LIB}/english.par

echo TAGGER $TAGGER

cat $* | $TAGGER $PARFILE -token -lemma -sgml 

